package com.nbicc.dp.modular.exception.custom;

import org.springframework.http.HttpStatus;

/**
 *
 */
public class CustomException extends RuntimeException {
    private HttpStatus status;

    private String message;

    public CustomException() {
        super();
    }

    public CustomException(ServiceException exception) {
        this.status = exception.getStatus();
        this.message = exception.getMessage();
    }

    public HttpStatus getStatus() {
        return status;
    }

    public void setStatus(HttpStatus httpStatus) {
        this.status = status;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}

